package j05array;

public class J01Arr {
    public static void main(String[] args) {
        //一维
        int[] arr1 = {1,3,5};
        //二维数组
        int[][] arr2 = new int[4][3];

        int[][] arr3 = {
                {1,2,3},
                {4,5,6},
                {7,9,0},
                {34,56}
        };

        System.out.println("arr3 = " + arr3);//
        System.out.println("arr3[0] = " + arr3[0]);

        System.out.println(arr3[0][0]);
        System.out.println(arr3[3][1]);
        System.out.println("arr3.length = " + arr3.length);//4
        System.out.println("arr3[1].length = " + arr3[1].length);//3
        System.out.println("arr3[arr3.length-1].length = " + arr3[arr3.length - 1].length);//2

        int[][] arr5 = new int[][]{
                {55,77,99}
        };
        System.out.println("======");
        //java一旦报错，程序立即终止
//        System.out.println(arr5[100]);
        arr5 = null;
        System.out.println(arr5[0]);

    }
}
